import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Scanner;

/**
 * Created by 14229 on 2020/2/27.
 */
public class Test03 {
    public static void main(String[] args) throws ParseException {
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入出生日期：");
        String s = sc.nextLine();
        SimpleDateFormat sim = new SimpleDateFormat("yyyy年MM月dd日");
        Date d = sim.parse(s);
        long time = d.getTime(); //出生日期
        System.out.println("你出生日期的毫秒值为："+time);


        Date d1 = new Date();
        SimpleDateFormat sim1 = new SimpleDateFormat("yyyy年MM月dd日");
        long time1 = d1.getTime();// 现在的日期
        System.out.println("当前日期的毫秒值为："+time1);

        System.out.println("自己活的毫秒值为："+(time1-time));
    }
}
